package com.ruoyi.web.controller.biz;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.service.impl.ResultMsg;
import com.ruoyi.common.service.impl.TicketCompanyServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 服务商表 控制层
 * <p>
 *
 */
@RestController
@RequestMapping("ticket")
public class TicketCompanyController extends BaseController {

    @Resource
    private TicketCompanyServiceImpl ticketCompanyService;

    /**
     * 查询服务商链接
     */
    @PostMapping("/getCompanyLink")
    public ResultMsg getCompanyLink(@RequestParam(required = false) String companyType) throws Exception {
        if (companyType == null || companyType.trim().isEmpty()) {
            return ResultMsg.error("companyType can not be empty!!");
        }
        // 查询服务商链接列表
        return ticketCompanyService.getTicketCompanyAddress(companyType);
    }
}
